derivative of function by defination